
<extend name="Base/common"/>

<block name="style">
    <link rel='stylesheet prefetch' href='__JS__/banner/flickity.css'>
    <link rel="stylesheet" href="__JS__/banner/style.css">
    <style type="text/css">
        .nav-pills{
            border-bottom: 1px solid #d3d1e5;
        }
        .nav-pills>li>a{
            border-radius: 0px;
        }
        .nav-pills>li.active>a, 
        .nav-pills>li.active>a:focus, 
        .nav-pills>li.active>a:hover{
            background-color: #fff;
            color: #8084e7;
            border-bottom: 2px solid #8084e7;
        }
        .flickity-page-dots{
            display: none!important;
        }
        .flickity-viewport{
            height: 300px!important;
        }
        .gallery{
            padding: 0px!important;
        }
        .gallery-cell img{
            height: 300px!important;
        }
        .gallery-cell{
            height: 300px!important;
        }
    </style>
</block>

<block name="body">
    <div id="page-wrapper" style="padding-left: 20px;padding-right: 20px;overflow: auto;">
        <div class="col-md-12 col-sm-12" style="padding-left: 0px;padding-right: 0px;">
           <div id="page-inner">                
                <div>
                    <div class="row">
                        <div class="col-md-9 col-sm-12 col-xs-12 w_clink_left" style="padding-left: 0px;">
                            <div class="w_clink_left_div">
                                <form class="row w_form1" id="search_form" action="{:U('Index/ajaxPostBidGood',array('id'=>I('get.id'),'is_end'=>1))}">
                                    <div class="form-group col-md-3">
                                        <label for="cate">类型</label>
                                        <select class="form-control" name="cate_id" id="cate">
                                            <option value="{$vo.id}">请选择</option>
                                            <volist name="cateList" id="vo">
                                                <option value="{$vo.id}">{$vo.name}</option>
                                            </volist>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-3">
                                        <label for="brand">品牌</label>
                                        <select class="form-control" name="brand_id" id="brand">
                                            <option value="{$vo.id}">请选择</option>
                                            <volist name="brandList" id="vo">
                                                <option value="{$vo.id}">{$vo.name}</option>
                                            </volist>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-3">
                                        <label for="model">型号</label>
                                        <select class="form-control" name="model_id" id="model">
                                            <option value="{$vo.id}">请选择</option>
                                            <volist name="modelList" id="vo">
                                                <option value="{$vo.id}">{$vo.name}</option>
                                            </volist>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-1" style="padding-right: 0!important;">
                                        <label for="search" style="opacity: 0;">1</label>
                                        <button type="button" id="search" class="btn btn-default form-control w_clink_left_btn">查询</button>
                                    </div>
                                    <div class="form-group col-md-1" style="padding-right: 0!important;">
                                        <label style="opacity: 0">1</label>
                                        <button type="button" id="refresh" class="btn btn-default form-control">重置</button>
                                    </div>
                                </form>
                     
                               <volist name="good_list" id="vo"> 
                              	  <?php
                                     $good_id=$vo['id'];
                                     $goods=M('goods')->where(array('id'=>$vo['good_id']))->find();
                                     $goods['good_img_arr']=explode(',',$goods['good_img']);
                                   ?>
                                <div class="w_clink_tableleft w_click11_div2">
                                    <div class="row w_click11_div2_div">
                                        <div class="col-md-4 w_clink11_1">{$goods['goods_name']}</div>
                                        <div class="col-md-3 w_clink11_1 gallery" style="">
                                            <notempty name="goods.good_img">
                                                <volist name="goods['good_img_arr']" id="img">
                                                    <div class="gallery-cell">
                                                        <img src="__ROOT__{$img}" style="width: 100%;" />
                                                    </div>
                                                </volist>
                                            </notempty>
                                        </div>
                                        <div class="col-md-3 w_clink11_2">
                                            <ul>
                                                <li>库存量：{$vo.store_count}台</li>
                                                <li id="start_number"  data-star="{$vo.start_number}">起拍数：{$vo.start_number}台</li>
                                                <li id="star_price"  data-star="{$vo.star_price}">起拍价：{$vo.star_price}元/台</li>
                                                <li id="mini_pricer"  data-star="{$vo.mini_pricer}">最低加价：{$vo.mini_pricer}元</li>
                                            </ul>
                                        </div>
                                        <div class="col-md-2 w_clink11_3">
                                            <form class="form-inline user_from">
                                              <div class="form-group">                      
                                                <div class="input-group" style="margin-top:10px">
                                                  <input type="text" class="form-control" name="user_number" value="{$my_bids[$good_id]['user_number']}" disabled="disabled">
                                                  <div class="input-group-addon">台</div>
                                                </div>
                                                <div class="input-group" style="margin-top:5px">
                                                  <input type="text" class="form-control" name="per_price"  value="{$my_bids[$good_id]['per_price']}" disabled="disabled">
                                                  <div class="input-group-addon">元/台</div>
                                                </div>
                                              </div>
                                            </form>
                                        </div>
                                      
                                    </div>
                                    <div class="w_clink11_wz">
                                        <span style="margin-left: 10px;">当前物品共计被出价<span style="font-size: 14px;margin: 0 5px;color:#8084e7;">{$vo.user_count}</span>次,
                                            <a href="javascript:" onclick="showBidUser($(this))">查看详情></a>
                                        </span>

                                        <if condition="isset($my_bids[$good_id])">
                                          <span class="my_bid">
                                             我的报价 ：<span>{$my_bids[$good_id]['per_price']}</span>元/台 &nbsp &nbsp
                                             竞拍量 ：<span>{$my_bids[$good_id]['user_number']}</span>台 &nbsp
                                             <if condition="$my_bids[$good_id]['yuji_count'] gt 0">
                                               <span class="fontgreen">本场已竞得：{$my_bids[$good_id]['yuji_count']}台</span>
                                             </if>
                                          </span>
                                        </if>
                                    </div>

                                    <div class="row w_click11_div2_div user_bid_list" style="padding-left: 10px!important;padding-right: 0!important;display: none;">

                                        <div class="col-md-6 col-sm-6 col-xs-6 user_bids">
                                            <table class="table" style="margin-bottom: 0px;">
                                                <volist name="vo['user_list']" id="ch">
                                                    <tr>
                                                        <td>{$ch.create_time|time_format='Y-m-d H:i:s'}</td>
                                                        <td><?php echo getUSerBidSn(I('get.id'),$ch['user_id'])?></td>
                                                        <td>{$ch.per_price}元/台</td>
                                                        <td>{$ch.user_number}台</td>
                                                    </tr>
                                                </volist>
                                            </table>
                                        </div>

                                        <div class="col-md-6 col-sm-6 col-xs-6" style="padding-left: 10px!important;padding-right: 10px!important;">
                                            <table class="table" style="border: 1px solid #ddd;margin-bottom: 0px;min-height: 280px;">
                                               <notempty name="vo['user_list'][0]">
                                                <tr class="active w_table_tr1" style="height: 40px;">
                                                    <td>报价人</td>
                                                    <td>报价</td>
                                                    <td>竞拍量</td>
                                                    <td>竞得</td>
                                                </tr>
                                                <tr style="color: #8084e7">
                                                    <td><?php echo getUSerBidSn(I('get.id'),$vo['user_list'][0]['user_id'])?></td>
                                                    <td>{$vo['user_list'][0].per_price}元/台</td>
                                                    <td>{$vo['user_list'][0].user_number}台</td>
                                                    <td>{$vo['user_list'][0].user_number}台</td>
                                                </tr>
                                               </notempty>
                                            </table>
                                        </div>
                                    </div>
                                </div>

                              </volist>  
                               
                            </div>
                        </div>
                        <div class="col-md-3 col-sm-2 col-xs-2" style="background: #f3f3f3;">
                            <div class="row w_clink11_right">
                                <div>
                                    <p class="w_clink11_right_time">竞价结束</p>
                                    <p>本专场身份编号{$user_sn}</p>
                                    <p>本专场包含{$good_list|count}组物品</p>
                                    <ul class="list-inline">
                                        <li><a href="#" target="_blank">竞拍规则</a></li>
                                        <li><a href="#" target="_blank">物品简介</a></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="row w_clink11_right2">
                                <table class="table table-hover"  style="margin-bottom: 0px;">
                                    <tr>
                                        <td class="title_name">本场已竞得<img class="help" src="__IMG__/help.png"></td>
                                        <td>
                                        	<span style="font-size: 18px;color:#1cc09f" id="expect_count">{$yuji_count}</span>个
                                        	<p style="padding: 0px;margin: 0px">
                                        		<span style="color: #1cc09f;font-size: 14px" id="expect_price">{$yuji_price}</span>元
                                        	</p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="title_name">未参与竞价<img class="help" src="__IMG__/help.png"></td>
                                        <td class="title_name"><span style="font-size: 20px;" id="not_count"><?php echo count($good_list)-count($my_bids);  ?></span>组</td>
                                    </tr>
                                    <tr>
                                        <td class="title_name">竞价被超越<img class="help" src="__IMG__/help.png"></td>
                                        <td class="title_name"><span style="color: red">{$excess_count}</span>个</td>
                                    </tr>
                                </table>
                            </div>
                        </div>          

                    </div>
                    
                </div>
           </div>                    
         </div>
        <!-- /. PAGE INNER  -->
    </div>
</block>
<block name="script">
    <script src='__JS__/banner/jquery.min.js'></script>
    <script src='__JS__/banner/flickity.pkgd.js'></script>

    <script  src="__JS__/banner/index.js"></script>
    <script type="text/javascript">

    </script>
</block>